package avicit.bdp.dds;

import avicit.bdp.dds.common.Constants;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@SpringBootApplication
@ServletComponentScan
@EnableScheduling
@ComponentScan(basePackages = {"avicit"},
        excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX,
                pattern = {"avicit.bdp.dds.server.*"}))
@EnableAsync
@EnableWebMvc
public class ApiApplicationServer extends SpringBootServletInitializer {

    public static void main(String[] args) {
        Thread.currentThread().setName(Constants.THREAD_NAME_API_SERVER);
        SpringApplication.run(ApiApplicationServer.class, args);
    }


}
